<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Pug Notification</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="A powerful library for creating notifications in android platform.">
    <link href="css/bootstrap-combined.min.css" rel="stylesheet">
    <link href="css/app.css" rel="stylesheet">
    <link href="css/app-theme.css" rel="stylesheet">
    <link href="http://fonts.googleapis.com/css?family=Roboto:400,300italic,100,100italic,300" rel="stylesheet" type="text/css">
  </head>
  <body data-target=".content-nav">
    <header>
      <div class="container">
        <div class="row">
          <div class="span5">
            <h1>Pug Notification</h1>
          </div>
          <div class="span7">
            <menu>
              <ul>
                <li><a href="#download" class="menu download">Download <span class="version-tag">Latest</span></a></li>
                <li><a href="https://github.com/halysongoncalves/PugNotification" data-title="View GitHub Project" class="menu github"><img src="image/icon-github.png" alt="GitHub"/></a></li>
              </ul>
            </menu>
          </div>
      </div>
    </header>
    <section id="subtitle">
      <div class="container">
        <div class="row">
          <div class="span12">
          <h2>A powerful library for <strong>creating notifications</strong> in android platform</h2>
          </div>
        </div>
      </div>
    </section>
    <section id="body">
      <div class="container">
        <div class="row">
          <div class="span9">
            <h3 id="introduction">Introduction</h3>
            <p>You're probably tired of writing code to display notifications in your applications, the library abstracts all the notifications construction process for you in a single line of code.
			Magic? Lie? I summarize in: productivity.</p>
            <pre class="prettyprint">PugNotification.with(context).load().title(title).message(message).bigTextStyle(bigtext).simple().build();
            </pre>
            <p>Many common pitfalls in building cases are handled automatically by PugNotification:</p>
            <ul>
              <li>Custom Notifications depend on <code>RemoteViews</code> and Android has RemoteView support for Api's below Jelly Bean.</li>
              <li>Notifications without no messages and title does not make sense there.</li>
            </ul>
			<p>In addition to these treatments, there are other held by Picasso Library Square:</p>
              <li>Handling <code>ImageView</code> recycling and download cancelation in an adapter.</li>
              <li>Complex image transformations with minimal memory use.</li>
              <li>Automatic memory and disk caching.</li>
            </ul>
            <p class="screenshot">
				<img src="image/screen2.png" alt="Sample application screenshot.">
				<img src="image/screen1.png" alt="Sample application screenshot.">
			</p>
            <h6 id="features">Features</h6>

            <h4>Simple Notification</h4>
            <p>Simple notification with just text and message.</p>
            <pre class="prettyprint">PugNotification.with(context)
    .load()
    .smallIcon(R.drawable.pugnotification_ic_launcher)
    .autoCancel(true)
    .largeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.pugnotification_ic_launcher))
    .title(title)
    .message(message)
    .bigTextStyle(bigtext)
    .simple()
    .build();
            </pre>

            <h4>Custom Notification</h4>
            <p>Custom notification with background.</p>
            <pre class="prettyprint">PugNotification.with(context)
    .load()
    .title(title)
    .message(message)
    .bigTextStyle(bigtext)
    .smallIcon(R.drawable.pugnotification_ic_launcher)
    .largeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.pugnotification_ic_launcher))
    .custom()
    .background(url)
    .build();
    		</pre>
            <h4>Place Holders</h4>
            <p>PugNotification supports placeholders if download the image in the background is not successful. The library already have a default placeholder size 622x384.</p>
            <pre class-"prettyprint">PugNotification.with(context)
    .load()
    .title(title)
    .message(message)
    .bigTextStyle(bigtext)
    .smallIcon(R.drawable.pugnotification_ic_launcher)
    .largeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.pugnotification_ic_launcher))
    .custom()
    .background(url)
    .setPlaceholder(R.drawable.pugnotification_ic_placeholder)
    .build();    		
    		</pre>

            <p>Using the picasso library for working with images. The request will be repeated three times before the error placeholder is shown.</p>



              <h6 id="proguard">Proguard</h6>
              <p>If you are using ProGuard make sure you add the following option:</p>
              <pre class="prettyprint">-dontwarn com.squareup.okhttp.**</pre>
              <h6 id="download">Download</h6>
            <p><a href="https://search.maven.org/remote_content?g=com.github.halysongoncalves&a=pugnotification&v=LATEST" class="dl version-href">&darr; <span class="version-tag">Latest</span> AAR</a></p>
            <p>The source code to the PugNotification, its samples, and this website is <a href="https://github.com/halysongoncalves/PugNotification">available on GitHub</a>.</p>

            <h4>Maven</h4>
            <pre class="prettyprint">&lt;dependency>
  &lt;groupId>com.github.halysongoncalves&lt;/groupId>
  &lt;artifactId>pugnotification&lt;/artifactId>
  &lt;version><span class="version pln"><em>(insert latest version)</em></span>&lt;/version>
&lt;/dependency></pre>

            <h4>Gradle</h4>
            <pre class="prettyprint">compile 'com.github.halysongoncalves:pugnotification:<span class="version pln"><em>(insert latest version)</em></span>'</pre>

            <h6 id="contributing">Contributing</h6>
            <p>If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.</p>
            <p>When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running <code>gradlew clean and gradlew assemble</code>.</p>

            <h6 id="license">License</h6>
            <pre>Copyright 2013 Halyson L. Gonçalves, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</pre>
          </div>
          <div class="span3">
            <div class="content-nav" data-spy="affix" data-offset-top="80">
              <ul class="nav nav-tabs nav-stacked primary">
                <li><a href="#introduction">Introduction</a></li>
                <li><a href="#features">Features</a></li>
                <li><a href="#download">Download</a></li>
                <li><a href="#contributing">Contributing</a></li>
                <li><a href="#license">License</a></li>
              </ul>
             </div>
          </div>
        </div>
      </div>
    </section>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="javaScript/bootstrap.min.js"></script>
    <script src="javaScript/jquery.smooth-scroll.min.js"></script>
    <script src="javaScript/jquery-maven-artifact.min.js"></script>
    <script src="javaScript/prettify.js"></script>
    <script type="text/javascript">
      $(function() {
        // Syntax highlight code blocks.
        prettyPrint();

        // Spy on scroll position for real-time updating of current section.
        $('body').scrollspy();

        // Use smooth-scroll for internal links.
        $('a').smoothScroll();

        // Enable tooltips on the header nav image items.
        $('.menu').tooltip({
          placement: 'bottom',
          trigger: 'hover',
          container: 'body',
          delay: {
            show: 500,
            hide: 0
          }
        });

        // Look up the latest version of the library.
        $.fn.artifactVersion('com.github.halysongoncalves', 'pugnotification', function(version, url) {
          $('.version').text(version);
          $('.version-tag').text('v' + version);
          $('.version-href').attr('href', url);
        });
      });
    </script>
  </body>
</html>
